package 面向对象中级.房屋出租系统;

import static 面向对象中级.房屋出租系统.Utility.*;

    public class HouseView {
        public static void mainMenu() {
            HouseService houseService = new HouseService();
            while (true) {
                System.out.println("---------------------房屋出租系统---------------------");
                System.out.println("---------------------1.新增房源---------------------");
                System.out.println("---------------------2.查找房源---------------------");
                System.out.println("---------------------3.删除房源---------------------");
                System.out.println("---------------------4.修改房屋信息---------------------");
                System.out.println("---------------------5.房屋列表---------------------");
                System.out.println("---------------------6.退出---------------------");
                System.out.println("请输入要执行的操作: ");
                char a = readMenuSelection();
                switch (a) {
                    case '1':
                        houseService.addHouse();
                        break;
                    case '2':
                        houseService.findHouse();
                        break;
                    case '3':
                        houseService.deleteHouse();
                        break;
                    case '4':
                        houseService.changeHouse();
                        break;
                    case '5':
                        houseService.listHouse();
                        break;
                    case '6':
                        return;
                }
            }
        }
    }
